Micron Document




Object-oriented programming
part 31/57 · 94.0 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Interface segregation principle: Clients should not be forced to depend upon interfaces that they do not use.
Dependency inversion principle: Depend upon abstractions, not concretes.

GRASP (General Responsibility Assignment Software Patterns) is another set of software design rules, created by Craig Larman, that helps developers assign responsibilities to different parts of a program:cite-ref-55[55]

• Creator Principle: allows classes create objects they closely use.
• Information Expert Principle: assigns tasks to classes with the needed information.
• Low Coupling Principle: reduces class dependencies to improve flexibility and maintainability.
• High Cohesion Principle: designing classes with a single, focused responsibility.
• Controller Principle: assigns system operations to separate classes that manage flow and interactions.
• Polymorphism: allows different classes to be used through a common interface, promoting flexibility and reuse.
• Pure Fabrication Principle: create helper classes to improve design, boost cohesion, and reduce coupling.

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────